<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ include file="../../../commons/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>列表</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<script type="text/javascript">
	//弹出任务分发框
	function saveBeforeSend(url){
		var isValid = $("#saveForm").form('validate');
		if (!isValid) {
			return;
		}
		var url="<%=path %>/jsp/busOrder/orderSend.jsp";	
		$('#orderSend').dialog('refresh', url);
 		$('#orderSend').dialog('open'); 
		//saveModel(url);		
	}
	
	var payType='${busOrder.payType}'
		if(payType==''){
			$('input:radio').eq(0).attr('checked', 'true')
		}
</script>
</head>
<body>
	<div id="tab_bd1">
		<div class="title">
			<div class="left">添加订单</div>
		</div>
		<div class="frame">
		<form id="saveForm" name="saveForm" method="post"  >
			<table width="100%" border="0" cellpadding="1" cellspacing="1"
				bordercolor="#CCCCCC" bgcolor="#CCCCCC" align="center">

				<tr>
					<td width="15%" class="lbg">订单名称：</td>
					<td width="35%">
						<input type="hidden" name="busOrder.id" value="${busOrder.id }" />
					<input type="text" class="easyui-validatebox"
						data-options="required:true" id="name" name="busOrder.orderName"
						value="${busOrder.orderName}"><font color="red" size="4">&nbsp;&nbsp;*&nbsp;</font>
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">业务人：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="phone" name="busOrder.owner"
						value="${busOrder.owner }"><font color="red" size="4">&nbsp;&nbsp;*&nbsp;</font>
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">开始时间：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="activityid" name="busOrder.beginDate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
						value="${busOrder.beginDate}"><font color="red" size="4">&nbsp;&nbsp;*&nbsp;</font>
						</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">结束时间：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="starttime" name="busOrder.endDate" onClick="WdatePicker({dateFmt:'yyyy-MM-dd'})"
						value="${busOrder.endDate}"><font color="red" size="4">&nbsp;&nbsp;*&nbsp;</font>
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">付款方式：</td>
					<td width="35%">
						<input type="radio" name="busOrder.payType" value="1"  ${fn:trim(busOrder.payType)=='1'?'checked' : '' }/>一次性付清 &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="busOrder.payType" value="2"  ${fn:trim(busOrder.payType)=='2'?'checked' : '' }/>挂账&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="busOrder.payType" value="3"  ${fn:trim(busOrder.payType)=='3'?'checked' : '' }/>业务 人代收 &nbsp;&nbsp;&nbsp;&nbsp;
						<input type="radio" name="busOrder.payType" value="4"  ${fn:trim(busOrder.payType)=='4'?'checked' : '' }/>司机代收&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">总金额：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="sumFee"
						name="busOrder.sumFee" value="${busOrder.sumFee }"></td>
				</tr>
				<tr>
					<td width="15%" class="lbg">垫付金额：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="perFee" name="busOrder.perFee" value="${busOrder.perFee}"></td>
				</tr>
				<tr>
					<td width="15%" class="lbg">客户名称：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="busOrder.parttener" name="busOrder.parttener"
						value="${busOrder.parttener}"></td>
				</tr>
				<tr>
					<td width="15%" class="lbg">客户联系人电话：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="parttenerPhone" name="busOrder.parttenerPhone"
						value="${busOrder.parttenerPhone}">
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">客户指定接人地址：</td>
					<td width="35%"><input type="text" class="easyui-validatebox"
						 id="begin_address" name="busOrder.beginAddress"
						value="${busOrder.beginAddress}">
					</td>
				</tr>
				<tr>
					<td width="15%" class="lbg">注意事项：</td>
					<td width="35%">
					<input type="hidden" id="busOrder_driverId" name="busOrder.driverId"  value="${busOrder.driverId}">
					<input type="hidden" id="busOrder_busId" name="busOrder.busId"  value="${busOrder.busId}">
					<input type="hidden" id="busOrder_driverName" name="busOrder.driverName" value="${busOrder.driverName}">
					<input type="hidden" id="busOrder_orderStatus" name="busOrder_orderStatus" >
					
					<textarea rows="4" style="wdith:375px" id="notify_memo" name="busOrder.notifyMemo">${busOrder.notifyMemo}</textarea>
					</td>
				</tr>
				<tr>
					<td colspan="4" align="center">
						<a href="javascript:saveBeforeSend('<%=path %>/busOrder/createOrUpdate')" class="easyui-linkbutton pad" iconCls="icon-ok"/>生成订单</a>
						<a href="javascript:history.go(-1)" class="easyui-linkbutton pad"
						iconCls="icon-cancel">返回</a></td>
				</tr>
			</table>
			</form>
		</div>
	</div>
	
		<div  id="orderSend"  class="easyui-dialog" data-options="title: '订单发放',   
				    width: 720,
				    height: 300,  
				    top:70, 
				    closed: true,   
				    cache: false,   
				    modal: true  ">
		</div>
		
</body>
</html>